from django.db import models

# Create your models here.
'''

class enterpriseWarning(models.Model):
    id = models.CharField
    name = models.CharField
    uniscid = models.CharField
    risk_level = models.CharField
    area = models.CharField
    legal_person = models.CharField
    industry = models.CharField
    capital = models.CharField
    founding_date = models.DateField
    address = models.CharField
    score_zh = models.IntegerField
    score_hlwzh = models.DecimalField(max_digits=8, decimal_places=2)

    class Meta:
        db_table = 'ywk.gx_sh_rs'
'''


class Article(models.Model):
    id = models.IntegerField(primary_key=True)
    title = models.CharField(max_length=200)
    content = models.CharField(max_length=200)
    label = models.CharField(max_length=32)
    topic_id = models.CharField(max_length=32)
    create_time = models.DateField(auto_now_add=True)
    user_id = models.CharField(max_length=32)

    class Meta:
        # 设置表名别名
        db_table = 'article'

    def __str__(self):
        return self.title
